﻿
namespace EasyNet.FastDFS
{
    using Xunit;

    public class TrackerClientTest
    {
        [Fact]
        public void GetStoreStorage()
        {
            var storageServer = TrackerClient.GetInstance().GetStoreStorage();

            Assert.NotNull(storageServer);
        }

        [Fact]
        public void GetStoreStorages()
        {
            var storageServers = TrackerClient.GetInstance().GetStoreStorages("gpa");

            Assert.NotNull(storageServers);
            Assert.NotEmpty(storageServers);
        }

        [Fact]
        public void GetFetchStorage()
        {
            var server = TrackerClient.GetInstance().GetFetchStorage("gpa", "M00/data/00/00/wKgBH057kvOQ2ARuADFvjVTRy8g344.JPG");

            Assert.NotNull(server);
        }

        [Fact]
        public void GetUpdateStorage()
        {
            var server = TrackerClient.GetInstance().GetUpdateStorage("gpa", "M00/data/00/00/wKgBH057kvOQ2ARuADFvjVTRy8g344.JPG");

            Assert.NotNull(server);
        }

        public void GetFetchStorages()
        {
            var servers = TrackerClient.GetInstance().GetFetchStorages("gpa", "M00/data/00/00/wKgBH057kvOQ2ARuADFvjVTRy8g344.JPG");

            Assert.NotNull(servers);
            Assert.NotEmpty(servers);
        }
    }
}
